package com.wswy.wyjk.db

import com.wswy.wyjk.model.Chapter
import com.wswy.wyjk.model.PracticeData
import com.wswy.wyjk.model.PracticeType
import com.wswy.wyjk.model.RecordData
import com.wswy.wyjk.model.dto.ExamRecord
import com.wswy.wyjk.model.dto.ExamRegular
import com.wswy.wyjk.model.dto.RecordDto
import com.wswy.wyjk.model.vo.ExamResult

interface DBHelper {

    fun findAllPractice(practiceType: PracticeType): List<PracticeData>?
    fun findAllRecord(practiceType: PracticeType): List<RecordData>?
    fun findAllChapter(practiceType: PracticeType): List<Chapter>?

    fun findAllDifficult(practiceType: PracticeType): List<Pair<PracticeData, RecordData>>?

    fun getExamRegulars(practiceType: PracticeType): List<ExamRegular>?

    fun saveExamRecord(examResult: ExamResult)
    fun findAllExamRecord(practiceType: PracticeType): List<ExamRecord>?


    fun countPractice(practiceType: PracticeType): Int
    fun countComplete(practiceType: PracticeType): Int
    fun countErr(practiceType: PracticeType): Int
    fun countRight(practiceType: PracticeType): Int
    fun saveRecord(recordDto: RecordDto?): Boolean

    fun AddErrData(id: Int?, car_type: String?, course: Int?)
    fun DeteErrData(id: Int?)

    fun upDateData(id: Int?, idDo: Int?,doA:Int?)

}